package com.room.search.repository;

import com.room.search.domain.RoomSecondCityList;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import javax.annotation.Nonnull;
import java.util.List;

@Repository
public interface RoomSecondCityListRepository extends JpaRepository<RoomSecondCityList, Long> {


    @Nonnull
    @EntityGraph("all_second")
    List<RoomSecondCityList> findAll();

    List<RoomSecondCityList> findByAdm2NameZh(String adm2Name);

}
